﻿///////////////////////////////////////////////////////////////
// This is generated code. 
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 2.6
// Code is generated on: Tuesday, July 12, 2011 11:08:19 AM
// Code is generated using templates: SD.TemplateBindings.SqlServerSpecific.NET20
// Templates vendor: Solutions Design.
// Templates version: 
//////////////////////////////////////////////////////////////
using System;
using System.Data;
using System.Data.SqlClient;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace DatabaseAdapter
{
	/// <summary>
	/// Class which contains the static logic to execute retrieval stored procedures in the database.
	/// </summary>
	public partial class RetrievalProcedures
	{
		/// <summary>
		/// private CTor so no instance can be created.
		/// </summary>
		private RetrievalProcedures()
		{
		}

	
		/// <summary>
		/// Calls stored procedure 'ChungLoaiSanPham_Pro'.<br/><br/>
		/// 
		/// </summary>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable ChungLoaiSanPhamPro()
		{
			using(DataAccessAdapter adapter = new DataAccessAdapter()) 
			{
				return ChungLoaiSanPhamPro( adapter);
			}
		}


		/// <summary>
		/// Calls stored procedure 'ChungLoaiSanPham_Pro'.<br/><br/>
		/// 
		/// </summary>
		/// <param name="adapter">The DataAccessAdapter object to use for the call</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable ChungLoaiSanPhamPro(DataAccessAdapter adapter)
		{
			SqlParameter[] parameters = new SqlParameter[0];


			DataTable toReturn = new DataTable("ChungLoaiSanPhamPro");
			bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[TKCN].[dbo].[ChungLoaiSanPham_Pro]", parameters, toReturn);

			return toReturn;
		}


		/// <summary>
		/// Calls stored procedure 'ChungLoaiSanPham_Pro'. This version also returns the return value of the stored procedure.<br/><br/>
		/// 
		/// </summary>
		/// <param name="returnValue">Return value of the stored procedure</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable ChungLoaiSanPhamPro(ref System.Int32 returnValue)
		{
			using(DataAccessAdapter adapter = new DataAccessAdapter()) 
			{
				return ChungLoaiSanPhamPro(ref returnValue, adapter);
			}
		}
	
	
		/// <summary>
		/// Calls stored procedure 'ChungLoaiSanPham_Pro'. This version also returns the return value of the stored procedure.<br/><br/>
		/// 
		/// </summary>
		/// <param name="returnValue">Return value of the stored procedure</param>
		/// <param name="adapter">The DataAccessAdapter object to use for the call</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable ChungLoaiSanPhamPro(ref System.Int32 returnValue, DataAccessAdapter adapter)
		{
			// create parameters. Add 1 to make room for the return value parameter.
			SqlParameter[] parameters = new SqlParameter[0 + 1];


			parameters[0] = new SqlParameter("RETURNVALUE", SqlDbType.Int, 0, ParameterDirection.ReturnValue, true, 10, 0, "",  DataRowVersion.Current, returnValue);
			DataTable toReturn = new DataTable("ChungLoaiSanPhamPro");
			bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[TKCN].[dbo].[ChungLoaiSanPham_Pro]", parameters, toReturn);


			returnValue = (int)parameters[0].Value;
			return toReturn;
		}

		/// <summary>Creates an IRetrievalQuery object for a call to the procedure 'ChungLoaiSanPham_Pro'.
		/// 
		/// </summary>
		/// <returns>IRetrievalQuery object which is ready to use for datafetching</returns>
		public static IRetrievalQuery GetChungLoaiSanPhamProCallAsQuery( )
		{
			RetrievalQuery toReturn = new RetrievalQuery( new SqlCommand("[TKCN].[dbo].[ChungLoaiSanPham_Pro]" ) );


			toReturn.Command.CommandType = CommandType.StoredProcedure;
			return toReturn;
		}
	

		/// <summary>
		/// Calls stored procedure 'LoginByPassword'.<br/><br/>
		/// 
		/// </summary>
		/// <param name="username">Input parameter of stored procedure</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable LoginByPassword(System.String username)
		{
			using(DataAccessAdapter adapter = new DataAccessAdapter()) 
			{
				return LoginByPassword(username,  adapter);
			}
		}


		/// <summary>
		/// Calls stored procedure 'LoginByPassword'.<br/><br/>
		/// 
		/// </summary>
		/// <param name="username">Input parameter of stored procedure</param>
		/// <param name="adapter">The DataAccessAdapter object to use for the call</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable LoginByPassword(System.String username, DataAccessAdapter adapter)
		{
			SqlParameter[] parameters = new SqlParameter[1];
			parameters[0] = new SqlParameter("@Username", SqlDbType.NVarChar, 10, ParameterDirection.Input, true, 0, 0, "",  DataRowVersion.Current, username);

			DataTable toReturn = new DataTable("LoginByPassword");
			bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[TKCN].[dbo].[LoginByPassword]", parameters, toReturn);

			return toReturn;
		}


		/// <summary>
		/// Calls stored procedure 'LoginByPassword'. This version also returns the return value of the stored procedure.<br/><br/>
		/// 
		/// </summary>
		/// <param name="username">Input parameter of stored procedure</param>
		/// <param name="returnValue">Return value of the stored procedure</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable LoginByPassword(System.String username, ref System.Int32 returnValue)
		{
			using(DataAccessAdapter adapter = new DataAccessAdapter()) 
			{
				return LoginByPassword(username, ref returnValue, adapter);
			}
		}
	
	
		/// <summary>
		/// Calls stored procedure 'LoginByPassword'. This version also returns the return value of the stored procedure.<br/><br/>
		/// 
		/// </summary>
		/// <param name="username">Input parameter of stored procedure</param>
		/// <param name="returnValue">Return value of the stored procedure</param>
		/// <param name="adapter">The DataAccessAdapter object to use for the call</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable LoginByPassword(System.String username, ref System.Int32 returnValue, DataAccessAdapter adapter)
		{
			// create parameters. Add 1 to make room for the return value parameter.
			SqlParameter[] parameters = new SqlParameter[1 + 1];
			parameters[0] = new SqlParameter("@Username", SqlDbType.NVarChar, 10, ParameterDirection.Input, true, 0, 0, "",  DataRowVersion.Current, username);

			parameters[1] = new SqlParameter("RETURNVALUE", SqlDbType.Int, 0, ParameterDirection.ReturnValue, true, 10, 0, "",  DataRowVersion.Current, returnValue);
			DataTable toReturn = new DataTable("LoginByPassword");
			bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[TKCN].[dbo].[LoginByPassword]", parameters, toReturn);


			returnValue = (int)parameters[1].Value;
			return toReturn;
		}

		/// <summary>Creates an IRetrievalQuery object for a call to the procedure 'LoginByPassword'.
		/// 
		/// </summary>
		/// <param name="username">Input parameter of stored procedure</param>
		/// <returns>IRetrievalQuery object which is ready to use for datafetching</returns>
		public static IRetrievalQuery GetLoginByPasswordCallAsQuery( System.String username)
		{
			RetrievalQuery toReturn = new RetrievalQuery( new SqlCommand("[TKCN].[dbo].[LoginByPassword]" ) );
			toReturn.Parameters.Add(new SqlParameter("@Username", SqlDbType.NVarChar, 10, ParameterDirection.Input, true, 0, 0, "",  DataRowVersion.Current, username));

			toReturn.Command.CommandType = CommandType.StoredProcedure;
			return toReturn;
		}
	

		/// <summary>
		/// Calls stored procedure 'LoginByUsername'.<br/><br/>
		/// 
		/// </summary>
		/// <param name="username">Input parameter of stored procedure</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable LoginByUsername(System.String username)
		{
			using(DataAccessAdapter adapter = new DataAccessAdapter()) 
			{
				return LoginByUsername(username,  adapter);
			}
		}


		/// <summary>
		/// Calls stored procedure 'LoginByUsername'.<br/><br/>
		/// 
		/// </summary>
		/// <param name="username">Input parameter of stored procedure</param>
		/// <param name="adapter">The DataAccessAdapter object to use for the call</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable LoginByUsername(System.String username, DataAccessAdapter adapter)
		{
			SqlParameter[] parameters = new SqlParameter[1];
			parameters[0] = new SqlParameter("@Username", SqlDbType.NVarChar, 10, ParameterDirection.Input, true, 0, 0, "",  DataRowVersion.Current, username);

			DataTable toReturn = new DataTable("LoginByUsername");
			bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[TKCN].[dbo].[LoginByUsername]", parameters, toReturn);

			return toReturn;
		}


		/// <summary>
		/// Calls stored procedure 'LoginByUsername'. This version also returns the return value of the stored procedure.<br/><br/>
		/// 
		/// </summary>
		/// <param name="username">Input parameter of stored procedure</param>
		/// <param name="returnValue">Return value of the stored procedure</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable LoginByUsername(System.String username, ref System.Int32 returnValue)
		{
			using(DataAccessAdapter adapter = new DataAccessAdapter()) 
			{
				return LoginByUsername(username, ref returnValue, adapter);
			}
		}
	
	
		/// <summary>
		/// Calls stored procedure 'LoginByUsername'. This version also returns the return value of the stored procedure.<br/><br/>
		/// 
		/// </summary>
		/// <param name="username">Input parameter of stored procedure</param>
		/// <param name="returnValue">Return value of the stored procedure</param>
		/// <param name="adapter">The DataAccessAdapter object to use for the call</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable LoginByUsername(System.String username, ref System.Int32 returnValue, DataAccessAdapter adapter)
		{
			// create parameters. Add 1 to make room for the return value parameter.
			SqlParameter[] parameters = new SqlParameter[1 + 1];
			parameters[0] = new SqlParameter("@Username", SqlDbType.NVarChar, 10, ParameterDirection.Input, true, 0, 0, "",  DataRowVersion.Current, username);

			parameters[1] = new SqlParameter("RETURNVALUE", SqlDbType.Int, 0, ParameterDirection.ReturnValue, true, 10, 0, "",  DataRowVersion.Current, returnValue);
			DataTable toReturn = new DataTable("LoginByUsername");
			bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[TKCN].[dbo].[LoginByUsername]", parameters, toReturn);


			returnValue = (int)parameters[1].Value;
			return toReturn;
		}

		/// <summary>Creates an IRetrievalQuery object for a call to the procedure 'LoginByUsername'.
		/// 
		/// </summary>
		/// <param name="username">Input parameter of stored procedure</param>
		/// <returns>IRetrievalQuery object which is ready to use for datafetching</returns>
		public static IRetrievalQuery GetLoginByUsernameCallAsQuery( System.String username)
		{
			RetrievalQuery toReturn = new RetrievalQuery( new SqlCommand("[TKCN].[dbo].[LoginByUsername]" ) );
			toReturn.Parameters.Add(new SqlParameter("@Username", SqlDbType.NVarChar, 10, ParameterDirection.Input, true, 0, 0, "",  DataRowVersion.Current, username));

			toReturn.Command.CommandType = CommandType.StoredProcedure;
			return toReturn;
		}
	

		/// <summary>
		/// Calls stored procedure 'SanPhamByChungLoaiSanPham_Pro'.<br/><br/>
		/// 
		/// </summary>
		/// <param name="maChungLoaiSanPham">Input parameter of stored procedure</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable SanPhamByChungLoaiSanPhamPro(System.String maChungLoaiSanPham)
		{
			using(DataAccessAdapter adapter = new DataAccessAdapter()) 
			{
				return SanPhamByChungLoaiSanPhamPro(maChungLoaiSanPham,  adapter);
			}
		}


		/// <summary>
		/// Calls stored procedure 'SanPhamByChungLoaiSanPham_Pro'.<br/><br/>
		/// 
		/// </summary>
		/// <param name="maChungLoaiSanPham">Input parameter of stored procedure</param>
		/// <param name="adapter">The DataAccessAdapter object to use for the call</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable SanPhamByChungLoaiSanPhamPro(System.String maChungLoaiSanPham, DataAccessAdapter adapter)
		{
			SqlParameter[] parameters = new SqlParameter[1];
			parameters[0] = new SqlParameter("@MaChungLoaiSanPham", SqlDbType.NVarChar, 20, ParameterDirection.Input, true, 0, 0, "",  DataRowVersion.Current, maChungLoaiSanPham);

			DataTable toReturn = new DataTable("SanPhamByChungLoaiSanPhamPro");
			bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[TKCN].[dbo].[SanPhamByChungLoaiSanPham_Pro]", parameters, toReturn);

			return toReturn;
		}


		/// <summary>
		/// Calls stored procedure 'SanPhamByChungLoaiSanPham_Pro'. This version also returns the return value of the stored procedure.<br/><br/>
		/// 
		/// </summary>
		/// <param name="maChungLoaiSanPham">Input parameter of stored procedure</param>
		/// <param name="returnValue">Return value of the stored procedure</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable SanPhamByChungLoaiSanPhamPro(System.String maChungLoaiSanPham, ref System.Int32 returnValue)
		{
			using(DataAccessAdapter adapter = new DataAccessAdapter()) 
			{
				return SanPhamByChungLoaiSanPhamPro(maChungLoaiSanPham, ref returnValue, adapter);
			}
		}
	
	
		/// <summary>
		/// Calls stored procedure 'SanPhamByChungLoaiSanPham_Pro'. This version also returns the return value of the stored procedure.<br/><br/>
		/// 
		/// </summary>
		/// <param name="maChungLoaiSanPham">Input parameter of stored procedure</param>
		/// <param name="returnValue">Return value of the stored procedure</param>
		/// <param name="adapter">The DataAccessAdapter object to use for the call</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable SanPhamByChungLoaiSanPhamPro(System.String maChungLoaiSanPham, ref System.Int32 returnValue, DataAccessAdapter adapter)
		{
			// create parameters. Add 1 to make room for the return value parameter.
			SqlParameter[] parameters = new SqlParameter[1 + 1];
			parameters[0] = new SqlParameter("@MaChungLoaiSanPham", SqlDbType.NVarChar, 20, ParameterDirection.Input, true, 0, 0, "",  DataRowVersion.Current, maChungLoaiSanPham);

			parameters[1] = new SqlParameter("RETURNVALUE", SqlDbType.Int, 0, ParameterDirection.ReturnValue, true, 10, 0, "",  DataRowVersion.Current, returnValue);
			DataTable toReturn = new DataTable("SanPhamByChungLoaiSanPhamPro");
			bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[TKCN].[dbo].[SanPhamByChungLoaiSanPham_Pro]", parameters, toReturn);


			returnValue = (int)parameters[1].Value;
			return toReturn;
		}

		/// <summary>Creates an IRetrievalQuery object for a call to the procedure 'SanPhamByChungLoaiSanPham_Pro'.
		/// 
		/// </summary>
		/// <param name="maChungLoaiSanPham">Input parameter of stored procedure</param>
		/// <returns>IRetrievalQuery object which is ready to use for datafetching</returns>
		public static IRetrievalQuery GetSanPhamByChungLoaiSanPhamProCallAsQuery( System.String maChungLoaiSanPham)
		{
			RetrievalQuery toReturn = new RetrievalQuery( new SqlCommand("[TKCN].[dbo].[SanPhamByChungLoaiSanPham_Pro]" ) );
			toReturn.Parameters.Add(new SqlParameter("@MaChungLoaiSanPham", SqlDbType.NVarChar, 20, ParameterDirection.Input, true, 0, 0, "",  DataRowVersion.Current, maChungLoaiSanPham));

			toReturn.Command.CommandType = CommandType.StoredProcedure;
			return toReturn;
		}
	

		/// <summary>
		/// Calls stored procedure 'SanPhamKhuonByChungLoaiSanPham_Pro'.<br/><br/>
		/// 
		/// </summary>
		/// <param name="maChungLoaiSanPham">Input parameter of stored procedure</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable SanPhamKhuonByChungLoaiSanPhamPro(System.String maChungLoaiSanPham)
		{
			using(DataAccessAdapter adapter = new DataAccessAdapter()) 
			{
				return SanPhamKhuonByChungLoaiSanPhamPro(maChungLoaiSanPham,  adapter);
			}
		}


		/// <summary>
		/// Calls stored procedure 'SanPhamKhuonByChungLoaiSanPham_Pro'.<br/><br/>
		/// 
		/// </summary>
		/// <param name="maChungLoaiSanPham">Input parameter of stored procedure</param>
		/// <param name="adapter">The DataAccessAdapter object to use for the call</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable SanPhamKhuonByChungLoaiSanPhamPro(System.String maChungLoaiSanPham, DataAccessAdapter adapter)
		{
			SqlParameter[] parameters = new SqlParameter[1];
			parameters[0] = new SqlParameter("@MaChungLoaiSanPham", SqlDbType.NVarChar, 20, ParameterDirection.Input, true, 0, 0, "",  DataRowVersion.Current, maChungLoaiSanPham);

			DataTable toReturn = new DataTable("SanPhamKhuonByChungLoaiSanPhamPro");
			bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[TKCN].[dbo].[SanPhamKhuonByChungLoaiSanPham_Pro]", parameters, toReturn);

			return toReturn;
		}


		/// <summary>
		/// Calls stored procedure 'SanPhamKhuonByChungLoaiSanPham_Pro'. This version also returns the return value of the stored procedure.<br/><br/>
		/// 
		/// </summary>
		/// <param name="maChungLoaiSanPham">Input parameter of stored procedure</param>
		/// <param name="returnValue">Return value of the stored procedure</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable SanPhamKhuonByChungLoaiSanPhamPro(System.String maChungLoaiSanPham, ref System.Int32 returnValue)
		{
			using(DataAccessAdapter adapter = new DataAccessAdapter()) 
			{
				return SanPhamKhuonByChungLoaiSanPhamPro(maChungLoaiSanPham, ref returnValue, adapter);
			}
		}
	
	
		/// <summary>
		/// Calls stored procedure 'SanPhamKhuonByChungLoaiSanPham_Pro'. This version also returns the return value of the stored procedure.<br/><br/>
		/// 
		/// </summary>
		/// <param name="maChungLoaiSanPham">Input parameter of stored procedure</param>
		/// <param name="returnValue">Return value of the stored procedure</param>
		/// <param name="adapter">The DataAccessAdapter object to use for the call</param>
		/// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
		public static DataTable SanPhamKhuonByChungLoaiSanPhamPro(System.String maChungLoaiSanPham, ref System.Int32 returnValue, DataAccessAdapter adapter)
		{
			// create parameters. Add 1 to make room for the return value parameter.
			SqlParameter[] parameters = new SqlParameter[1 + 1];
			parameters[0] = new SqlParameter("@MaChungLoaiSanPham", SqlDbType.NVarChar, 20, ParameterDirection.Input, true, 0, 0, "",  DataRowVersion.Current, maChungLoaiSanPham);

			parameters[1] = new SqlParameter("RETURNVALUE", SqlDbType.Int, 0, ParameterDirection.ReturnValue, true, 10, 0, "",  DataRowVersion.Current, returnValue);
			DataTable toReturn = new DataTable("SanPhamKhuonByChungLoaiSanPhamPro");
			bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[TKCN].[dbo].[SanPhamKhuonByChungLoaiSanPham_Pro]", parameters, toReturn);


			returnValue = (int)parameters[1].Value;
			return toReturn;
		}

		/// <summary>Creates an IRetrievalQuery object for a call to the procedure 'SanPhamKhuonByChungLoaiSanPham_Pro'.
		/// 
		/// </summary>
		/// <param name="maChungLoaiSanPham">Input parameter of stored procedure</param>
		/// <returns>IRetrievalQuery object which is ready to use for datafetching</returns>
		public static IRetrievalQuery GetSanPhamKhuonByChungLoaiSanPhamProCallAsQuery( System.String maChungLoaiSanPham)
		{
			RetrievalQuery toReturn = new RetrievalQuery( new SqlCommand("[TKCN].[dbo].[SanPhamKhuonByChungLoaiSanPham_Pro]" ) );
			toReturn.Parameters.Add(new SqlParameter("@MaChungLoaiSanPham", SqlDbType.NVarChar, 20, ParameterDirection.Input, true, 0, 0, "",  DataRowVersion.Current, maChungLoaiSanPham));

			toReturn.Command.CommandType = CommandType.StoredProcedure;
			return toReturn;
		}

        /// <summary>
        /// Calls stored procedure 'SanPhamClastByChungLoaiSanPham_Pro'.<br/><br/>
        /// 
        /// </summary>
        /// <param name="maChungLoaiSanPham">Input parameter of stored procedure</param>
        /// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
        public static DataTable SanPhamClastByChungLoaiSanPhamPro(System.String maChungLoaiSanPham)
        {
            using (DataAccessAdapter adapter = new DataAccessAdapter())
            {
                return SanPhamClastByChungLoaiSanPhamPro(maChungLoaiSanPham, adapter);
            }
        }


        /// <summary>
        /// Calls stored procedure 'SanPhamKhuonByChungLoaiSanPham_Pro'.<br/><br/>
        /// 
        /// </summary>
        /// <param name="maChungLoaiSanPham">Input parameter of stored procedure</param>
        /// <param name="adapter">The DataAccessAdapter object to use for the call</param>
        /// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
        public static DataTable SanPhamClastByChungLoaiSanPhamPro(System.String maChungLoaiSanPham, DataAccessAdapter adapter)
        {
            SqlParameter[] parameters = new SqlParameter[1];
            parameters[0] = new SqlParameter("@MaChungLoaiSanPham", SqlDbType.NVarChar, 20, ParameterDirection.Input, true, 0, 0, "", DataRowVersion.Current, maChungLoaiSanPham);

            DataTable toReturn = new DataTable("SanPhamClastByChungLoaiSanPhamPro");
            bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[TKCN].[dbo].[SanPhamClastByChungLoaiSanPham_Pro]", parameters, toReturn);

            return toReturn;
        }


        /// <summary>
        /// Calls stored procedure 'SanPhamKhuonByChungLoaiSanPham_Pro'. This version also returns the return value of the stored procedure.<br/><br/>
        /// 
        /// </summary>
        /// <param name="maChungLoaiSanPham">Input parameter of stored procedure</param>
        /// <param name="returnValue">Return value of the stored procedure</param>
        /// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
        public static DataTable SanPhamClastByChungLoaiSanPhamPro(System.String maChungLoaiSanPham, ref System.Int32 returnValue)
        {
            using (DataAccessAdapter adapter = new DataAccessAdapter())
            {
                return SanPhamClastByChungLoaiSanPhamPro(maChungLoaiSanPham, ref returnValue, adapter);
            }
        }


        /// <summary>
        /// Calls stored procedure 'SanPhamKhuonByChungLoaiSanPham_Pro'. This version also returns the return value of the stored procedure.<br/><br/>
        /// 
        /// </summary>
        /// <param name="maChungLoaiSanPham">Input parameter of stored procedure</param>
        /// <param name="returnValue">Return value of the stored procedure</param>
        /// <param name="adapter">The DataAccessAdapter object to use for the call</param>
        /// <returns>Filled DataTable with resultset(s) of stored procedure</returns>
        public static DataTable SanPhamClastByChungLoaiSanPhamPro(System.String maChungLoaiSanPham, ref System.Int32 returnValue, DataAccessAdapter adapter)
        {
            // create parameters. Add 1 to make room for the return value parameter.
            SqlParameter[] parameters = new SqlParameter[1 + 1];
            parameters[0] = new SqlParameter("@MaChungLoaiSanPham", SqlDbType.NVarChar, 20, ParameterDirection.Input, true, 0, 0, "", DataRowVersion.Current, maChungLoaiSanPham);

            parameters[1] = new SqlParameter("RETURNVALUE", SqlDbType.Int, 0, ParameterDirection.ReturnValue, true, 10, 0, "", DataRowVersion.Current, returnValue);
            DataTable toReturn = new DataTable("SanPhamClastByChungLoaiSanPhamPro");
            bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[TKCN].[dbo].[SanPhamClastByChungLoaiSanPham_Pro]", parameters, toReturn);


            returnValue = (int)parameters[1].Value;
            return toReturn;
        }

        /// <summary>Creates an IRetrievalQuery object for a call to the procedure 'SanPhamKhuonByChungLoaiSanPham_Pro'.
        /// 
        /// </summary>
        /// <param name="maChungLoaiSanPham">Input parameter of stored procedure</param>
        /// <returns>IRetrievalQuery object which is ready to use for datafetching</returns>
        public static IRetrievalQuery GetSanPhamClastByChungLoaiSanPhamProCallAsQuery(System.String maChungLoaiSanPham)
        {
            RetrievalQuery toReturn = new RetrievalQuery(new SqlCommand("[TKCN].[dbo].[SanPhamClastByChungLoaiSanPham_Pro]"));
            toReturn.Parameters.Add(new SqlParameter("@MaChungLoaiSanPham", SqlDbType.NVarChar, 20, ParameterDirection.Input, true, 0, 0, "", DataRowVersion.Current, maChungLoaiSanPham));

            toReturn.Command.CommandType = CommandType.StoredProcedure;
            return toReturn;
        }
		//Got che
        public static DataTable SanPhamGotCheByChungLoaiSanPhamPro(System.String maChungLoaiSanPham)
        {
            using (DataAccessAdapter adapter = new DataAccessAdapter())
            {
                return SanPhamGotCheByChungLoaiSanPhamPro(maChungLoaiSanPham, adapter);
            }
        }


        public static DataTable SanPhamGotCheByChungLoaiSanPhamPro(System.String maChungLoaiSanPham, DataAccessAdapter adapter)
        {
            SqlParameter[] parameters = new SqlParameter[1];
            parameters[0] = new SqlParameter("@MaChungLoaiSanPham", SqlDbType.NVarChar, 20, ParameterDirection.Input, true, 0, 0, "", DataRowVersion.Current, maChungLoaiSanPham);

            DataTable toReturn = new DataTable("SanPhamGotCheByChungLoaiSanPhamPro");
            bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[TKCN].[dbo].[SanPhamGotCheByChungLoaiSanPham_Pro]", parameters, toReturn);

            return toReturn;
        }


        public static DataTable SanPhamGotCheByChungLoaiSanPhamPro(System.String maChungLoaiSanPham, ref System.Int32 returnValue)
        {
            using (DataAccessAdapter adapter = new DataAccessAdapter())
            {
                return SanPhamGotCheByChungLoaiSanPhamPro(maChungLoaiSanPham, ref returnValue, adapter);
            }
        }

        public static DataTable SanPhamGotCheByChungLoaiSanPhamPro(System.String maChungLoaiSanPham, ref System.Int32 returnValue, DataAccessAdapter adapter)
        {
            // create parameters. Add 1 to make room for the return value parameter.
            SqlParameter[] parameters = new SqlParameter[1 + 1];
            parameters[0] = new SqlParameter("@MaChungLoaiSanPham", SqlDbType.NVarChar, 20, ParameterDirection.Input, true, 0, 0, "", DataRowVersion.Current, maChungLoaiSanPham);

            parameters[1] = new SqlParameter("RETURNVALUE", SqlDbType.Int, 0, ParameterDirection.ReturnValue, true, 10, 0, "", DataRowVersion.Current, returnValue);
            DataTable toReturn = new DataTable("SanPhamGotCheByChungLoaiSanPhamPro");
            bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[TKCN].[dbo].[SanPhamGotCheByChungLoaiSanPham_Pro]", parameters, toReturn);


            returnValue = (int)parameters[1].Value;
            return toReturn;
        }

        public static IRetrievalQuery GetSanPhamGotCheByChungLoaiSanPhamProCallAsQuery(System.String maChungLoaiSanPham)
        {
            RetrievalQuery toReturn = new RetrievalQuery(new SqlCommand("[TKCN].[dbo].[SanPhamGotCheByChungLoaiSanPham_Pro]"));
            toReturn.Parameters.Add(new SqlParameter("@MaChungLoaiSanPham", SqlDbType.NVarChar, 20, ParameterDirection.Input, true, 0, 0, "", DataRowVersion.Current, maChungLoaiSanPham));

            toReturn.Command.CommandType = CommandType.StoredProcedure;
            return toReturn;
        }
		
        #region 'Sản phẩm bọ'

        public static DataTable SanPhamBoByChungLoaiSanPhamPro(System.String maChungLoaiSanPham)
        {
            using (DataAccessAdapter adapter = new DataAccessAdapter())
            {
                return SanPhamBoByChungLoaiSanPhamPro(maChungLoaiSanPham, adapter);
            }
        }

        public static DataTable SanPhamBoByChungLoaiSanPhamPro(System.String maChungLoaiSanPham, DataAccessAdapter adapter)
        {
            SqlParameter[] parameters = new SqlParameter[1];
            parameters[0] = new SqlParameter("@MaChungLoaiSanPham", SqlDbType.NVarChar, 20, ParameterDirection.Input, true, 0, 0, "", DataRowVersion.Current, maChungLoaiSanPham);

            DataTable toReturn = new DataTable("SanPhamBoByChungLoaiSanPhamPro");
            bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[TKCN].[dbo].[SanPhamBoByChungLoaiSanPham_Pro]", parameters, toReturn);

            return toReturn;
        }

        public static DataTable SanPhamBoByChungLoaiSanPhamPro(System.String maChungLoaiSanPham, ref System.Int32 returnValue)
        {
            using (DataAccessAdapter adapter = new DataAccessAdapter())
            {
                return SanPhamBoByChungLoaiSanPhamPro(maChungLoaiSanPham, ref returnValue, adapter);
            }
        }

        public static DataTable SanPhamBoByChungLoaiSanPhamPro(System.String maChungLoaiSanPham, ref System.Int32 returnValue, DataAccessAdapter adapter)
        {
            // create parameters. Add 1 to make room for the return value parameter.
            SqlParameter[] parameters = new SqlParameter[1 + 1];
            parameters[0] = new SqlParameter("@MaChungLoaiSanPham", SqlDbType.NVarChar, 20, ParameterDirection.Input, true, 0, 0, "", DataRowVersion.Current, maChungLoaiSanPham);

            parameters[1] = new SqlParameter("RETURNVALUE", SqlDbType.Int, 0, ParameterDirection.ReturnValue, true, 10, 0, "", DataRowVersion.Current, returnValue);
            DataTable toReturn = new DataTable("SanPhamBoByChungLoaiSanPhamPro");
            bool hasSucceeded = adapter.CallRetrievalStoredProcedure("[TKCN].[dbo].[SanPhamBoByChungLoaiSanPham_Pro]", parameters, toReturn);


            returnValue = (int)parameters[1].Value;
            return toReturn;
        }

        public static IRetrievalQuery GetSanPhamBoByChungLoaiSanPhamProCallAsQuery(System.String maChungLoaiSanPham)
        {
            RetrievalQuery toReturn = new RetrievalQuery(new SqlCommand("[TKCN].[dbo].[SanPhamBoByChungLoaiSanPham_Pro]"));
            toReturn.Parameters.Add(new SqlParameter("@MaChungLoaiSanPham", SqlDbType.NVarChar, 20, ParameterDirection.Input, true, 0, 0, "", DataRowVersion.Current, maChungLoaiSanPham));

            toReturn.Command.CommandType = CommandType.StoredProcedure;
            return toReturn;
        }
#endregion

        #region Included Code

		#endregion
	}
}
